package com.duoduo.common.api.domain;

import java.io.Serializable;

/**延迟任务用于传输保障的参数
 * @author duoduo
 *
 * @param <T>
 */
public class DelayExecuteMessage<T> implements Serializable {

    /**
	 * 
	 */
	private static final long serialVersionUID = -2615054289794901788L;

	/**
     * 延时执行时，寻找执行器的key
     */
    private String executeKey;
    
    private String taskFlag; // 任务标识，用于区分不同服务的任务

    private T data;
    
    private Long traceId; // 可以外部传入，重试的时候也会直接置入

    private boolean retry; //是否支持retry
    
    private boolean retrySend = false; //是否是重试的消息
    
    public String getExecuteKey() {
        return executeKey;
    }

    public void setExecuteKey(String executeKey) {
        this.executeKey = executeKey;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

	public Long getTraceId() {
		return traceId;
	}

	public void setTraceId(Long traceId) {
		this.traceId = traceId;
	}

	public boolean isRetry() {
		return retry;
	}

	public void setRetry(boolean retry) {
		this.retry = retry;
	}

	public boolean isRetrySend() {
		return retrySend;
	}

	public void setRetrySend(boolean retrySend) {
		this.retrySend = retrySend;
	}

	public String getTaskFlag() {
		return taskFlag;
	}

	public void setTaskFlag(String taskFlag) {
		this.taskFlag = taskFlag;
	}
    
}
